<?php 
public function pageIndex($inPath){
		
		return $this->render('union/keywordsauto.html');
	}
	
	public function pageKeyauto($inPath){
		
		 header("Content-type:application/vnd.ms-excel");
         header("Content-Disposition:filename=keys.xls");
		
		$_REQUEST = zbj_lib_BaseUtils::saddslashes($_REQUEST);
		$sKey = $_REQUEST['key'];
		$sAd  = $_REQUEST['ad'];
		if(!$sKey || !$sAd){
			return $this->ShowMsgNew(array('state'=>-1,'msg'=>'请填入形容词和关键词'));
			exit;
		}
		$aList = $this->mZtunareatable->select('','areaname')->items;
		
        echo iconv('utf-8','gb2312',"\"地区形容词关键词\"\n");
        if(!$aList){
			return $this->ShowMsgNew(array('state'=>-1,'msg'=>'请到测试环境cp.v3.zbj.com上操作'));
			exit;
		}
		//内容的时候     循环写入
		
        foreach($aList as $k => $v){
        	echo iconv('utf-8','gb2312',"\"{$v['areaname']}{$sAd}{$sKey}\"\n");
                  
        }

	}
 header("Content-type:application/vnd.ms-excel");
         header("Content-Disposition:filename=keys.xls");
echo iconv('utf-8','gb2312',"\"{$v['areaname']}{$sAd}{$sKey}\"\n");

?>